home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Guided Tour of Multimedia (Second Edition)
/
The Guided Tour of Multimedia (Second Edition).iso
/
trials
/
director
/
evalcopy
/
director.z
/
XOBJECT.H
< prev
Wrap
C/C++ Source or Header
|
1994-06-02
|
6KB
|
152 lines
#ifndef __XObject__
#define __XObject__
/* --
XObject inferface for Windows Lingo 3.0.
24may94 JT Added mem_ReverseBytes.
05feb93 JT Added more call backs.
25aug92 JT Resurrected from the dead.
-- */
/*
------------------------------------------------------------------------------
Constants:
------------------------------------------------------------------------------
*/
/* -- Lingo data type codes. non-handles */
#define TY_NULL (0) // Null Type
#define TY_NOVALUE (2) // No Return Value ("X")
#define TY_LONGINT (4) // Integer ("I")
#define TY_SYMBOL (8) // Symbol Type
#define TY_STRING_PTR (10) // String Pointer Type
/* -- Lingo data type codes. handles */
#define TY_STRING (1) // Null-terminated string handle ("S")
#define TY_OBJECT (3) // XObject instance handle ("O")
#define TY_PICTURE (5) // Metafile handle ("P")
#define TY_FLOAT (9) // Long double handle Type
/*
------------------------------------------------------------------------------
Types:
------------------------------------------------------------------------------
*/
/* -- A typed value -- */
typedef struct
{
short ty; /* -- Type code -- */
long it; /* -- Some datum. handle if a TY_STRING -- */
} LxValue, *LxValuePtr;
/* -- Memory management interface -- */
typedef void *LxMemPtr;
typedef void **LxMemHandle;
typedef void (*LxMsgProcPtr) (void);
/* -- Call backs to Lingo -- */
typedef struct
{
long version;
void (__far __pascal *xobj_Dispose) (LxMemHandle xobj);
LxMemHandle(__far __pascal *mem_New) (long size,
BOOL zeroInit);
void (__far __pascal *mem_Dispose) (LxMemHandle hdl);
LxMemHandle(__far __pascal *mem_SetSize) (LxMemHandle hdl,
long newSize);
long (__far __pascal *mem_GetSize) (LxMemHandle hdl);
LxMemPtr(__far __pascal *mem_Lock) (LxMemHandle hdl);
void (__far __pascal *mem_Unlock) (LxMemHandle hdl);
LxMemHandle(__far __pascal *mem_Clone) (LxMemHandle hdl);
LxMemHandle(__far __pascal *mem_AppendPtr) (LxMemHandle hdl,
LxMemPtr src,
long count);
BOOL (__far __pascal *mem_Equal) (LxMemHandle hdl1,
LxMemHandle hdl2);
void (__far __pascal *mem_Copy) (LxMemPtr dest,
LxMemPtr src,
long count);
void (__far __pascal *mem_ZeroPtr) (LxMemPtr dest,
long count);
LxMemHandle(__far __pascal *string_New) (LPSTR str);
void (__far __pascal *showMsg) (LPSTR str);
HWND (__far __pascal *getStageWindow) (void);
long (__far __pascal *register_QTActor) (LxMemHandle me,
LPSTR fileType,
BOOL install);
long (__far __pascal *register_StageEar) (LxMemHandle me,
long msg,
BOOL install);
BOOL (__far __pascal *fileDlg_SaveAs) (LPSTR szTitleIn,
LPSTR szDefSpec,
LPSTR szFileNameIn);
BOOL (__far __pascal *fileDlg_Open) (LPSTR szTitleIn,
LPSTR szDefSpec,
LPSTR szFileNameIn);
void (__far __pascal *ConvertMACToDosPath) (LPSTR macPath,
LPSTR dosPath,
short maxDosPathLen);
void (__far __pascal *ConvertDosPathToMAC) (LPSTR path);
LxMemHandle(__far __pascal *GetLingoGlobal) (LPSTR symbolBuf);
void (__far __pascal *SetLingoGlobal) (LPSTR symbolBuf,
LxMemHandle newValue);
void (__far __pascal *ConvertSymbolToStr) (long symbolid,
LPSTR symbolBuf);
long (__far __pascal *ConvertStrToSymbol) (LPSTR symbolBuf);
void (__far __pascal *SendPerform) (long nargs,
LxValuePtr argPtr,
LxMemHandle obj);
LxMemHandle(__far __pascal *FindFactory) (LPSTR symbolBuf);
char (__far __pascal *SetOverrideDrive) (char driveLetter);
void (__far __pascal *ResetPalette) (void);
void (__far __pascal *mem_ReverseBytes)
(void __huge * ptr, char* structDef, long entrySize, long len);
} LxProcTable, *LxProcTablePtr;
/* -- The xobject header. All instance must start with this -- */
typedef struct
{
long reserved1; /* -- Reserved for interal use */
long reserved2; /* -- Reserved for interal use */
long reserved3; /* -- Reserved for interal use */
long reserved4; /* -- Reserved for interal use */
} LxXObjHeader, *LxXObjHeaderPtr;
/*
------------------------------------------------------------------------------
Variables:
------------------------------------------------------------------------------
*/
/*
------------------------------------------------------------------------------
Functions:
------------------------------------------------------------------------------
*/
/*
------------------------------------------------------------------------------
Macros:
------------------------------------------------------------------------------
*/
#endif